import os, sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from string import sqString

def cmp(cstr1, cstr2):
    s1 = sqString()
    s2 = sqString()
    s1.StrAssign(cstr1)
    s2.StrAssign(cstr2)
    minlen = min(s1.getsize(), s2.getsize())
    for i in range(minlen):
        if s1[i] > s2[i]:
            return 1
        if s1[i] < s2[i]:
            return 2
    if s1.getsize() > s2.getsize():
        return 1
    elif s1.getsize() < s2.getsize():
        return 2
    else:
        return 0     
    

if __name__ == "__main__":
    cstr1 = "aaas"
    cstr2 = "aaaaa"
    print(cmp(cstr1, cstr2))